﻿@model IEnumerable<Pr0ject0.ViewModel.JobViewModel>

@{
    ViewBag.Title = "Jobs";
}
<br />
<div class="button">
    @Html.Partial("~\\Views\\Shared\\_PartialLogout.cshtml") 
</div>
<br />

<div class="button">
    @Html.ActionLink("Add Job", "AddJob")
</div>
<br />

<div class="button">
    @Html.ActionLink("Index", "Index")
</div>

<h2>Jobs</h2>

@using (Html.BeginForm())
{
    <table>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.title)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.department)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.store)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.salary)
            </th>
        </tr>

    @foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.title)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.department)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.store)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.salary)
            </td>
            <td>
                @Html.CheckBox(item.ID.ToString())
            </td>

        </tr>
    }
    </table>
    
    <br />
    
    <p>
        <input type="submit" value="Close" />
    </p>
}